| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 | angular.module 'oblique-features' .directive 'ofFeature', (featuresService) -> restrict: 'EA' transclude: true scope: feature: '@' controller: ($scope, featuresService) -> $scope.checkFeatureEnabled = (featureName) -> featuresService.checkFeatureEnabled(featureName) $scope.toggleFeatureEnabled = (featureName) -> featuresService.toggleFeatureEnabled(featureName) template: '<span ng-if="checkFeatureEnabled(feature)" ng-transclude />' |